package com.zhoug.common.prodivers;

import androidx.core.content.FileProvider;


/**
 *
 * AndroidManifest.xml配置
 * <provider
 *    android:name="android.support.v4.content.FileProvider"
 *    android:authorities="${applicationId}.fileprovider"
 *    android:grantUriPermissions="true"
 *    android:exported="false">
 *    <meta-data
 *       android:name="android.support.FILE_PROVIDER_PATHS"
 *       android:resource="@xml/common_file_paths"/>
 *</provider>
 *
 *
 *
 */
public class ZFileProvider extends FileProvider {
    /**
     * 默认的FileProvider 的authority后缀
     */
    public static final String FILE_PROVIDER_AUTHORITY_SUFFIX=".fileprovider";


    /**
     * 获取默认的file_provider_authority
     * @return
     */
    public static String getAuthority(){
        return AppContextProvider.getAppContext().getPackageName()+FILE_PROVIDER_AUTHORITY_SUFFIX;
    }
}
